﻿namespace MiniCap.Configuration;

public sealed class MiniCapOptions
{
    public required string MySqlConnectionString { get; init; }


    // RabbitMQ
    public string RabbitMqUri { get; init; }
    public string Exchange { get; init; } = "minicap.exchange";
    public string QueuePrefix { get; init; } = "minicap"; // 订阅队列前缀


    // Outbox 轮询
    public TimeSpan DispatcherInterval { get; init; } = TimeSpan.FromSeconds(5);
    public int DispatcherBatchSize { get; init; } = 100;
    public int MaxSendRetry { get; init; } = 5;


    // 消费重试
    public int MaxConsumeRetry { get; init; } = 5;
    public TimeSpan ConsumeRetryDelay { get; init; } = TimeSpan.FromSeconds(5);
}

